Write to excel

Hello,

Was wondering why this example from the DXL manual isn't working(Office 2007&2010)? How would one also write the "Absolute Number" within the cell comment field? Thank you.

/**
 * Created by:
 * Creation date: Sep 25, 2014
 *
 * DXL Editor is provided by SODIUS (www.sodius.com)
 */
pragma encoding, "UTF-8"
pragma runLim, 0

/*
This function sets a specific property for a specific cell in a specific Excel
Worksheet. If it succeeds it returns null otherwise it returns an error string
*/

string SetExcelCell(OleAutoObj objSheet,
                    int        xCellLoc,
                    int        yCellLoc,
                    string     property,
                    string     value)
{
    OleAutoObj  objCell  = null
    OleAutoArgs autoArgs = create ()
    string      result   = null
    put(autoArgs, yCellLoc)
    put(autoArgs, xCellLoc)
    result = oleMethod(objSheet, "Cells", autoArgs, objCell)
    if (result == null) {
        OleAutoObj objInterior = null
        result = olePut(objCell, property, value)
    }
    return result
}

/* SetExcelCell */
OleAutoObj  objExcel = oleCreateAutoObject("Excel.Application")
OleAutoArgs autoArgs = create()
OleAutoObj  objSpreadSheet
OleAutoObj  objWorkbooks
bool        excelVisible

/* Make Excel visible to the user */
oleGet(objExcel, "visible", excelVisible)
if (excelVisible == false)
    olePut(objExcel, "visible", true)

/* Add new workbook */
oleGet(objExcel, "Workbooks", objWorkbooks)
oleMethod(objWorkbooks, "Add")
clear(autoArgs)
put(autoArgs, "Sheet1")

/* Add new worksheet and activate it */
oleMethod(objSpreadSheet, "Activate")
SetExcelCell(objSpreadSheet, 2, 2, "Value", (10""))
SetExcelCell(objSpreadSheet, 2, 3, "Value", (20""))
SetExcelCell(objSpreadSheet, 2, 4, "Value", (30""))
SetExcelCell(objSpreadSheet, 2, 5, "Value", (40""))
SetExcelCell(objSpreadSheet, 2, 6, "Value", (50""))
SetExcelCell(objSpreadSheet, 2, 7, "Formula", "=SUM(B2:B6)")
 


EHcnck - Thu Oct 09 13:10:48 EDT 2014